<?php
echo $this->set('title_for_layout', __('Order Review'));

$this->Html->addCrumb('<i class="fa fa-home"></i> ' . Inflector::camelize('Início'), '/', array('escape' => false));
$this->Html->addCrumb(__('Shopping Cart'), '/shop/cart', array('escape' => false));
$this->Html->addCrumb(__('Address'), '/shop/address', array('escape' => false));
$this->Html->addCrumb(__('Order Review'), NULL, array('escape' => false));
?>

<?php echo $this->Html->script(array('shop_review.js'), array('inline' => false)); ?>

<style type="text/css">
    #ccbox {
        background: transparent url("<?php echo $this->webroot; ?>img/cards.png");
        margin: 0 0 10px 0;
        padding: 0 0 0 150px;
        width: 0;
        height: 23px;
        overflow: hidden;
    }
</style>
<div class="col-xs-12 fundo_branco">
    <div class="row">
        <div class="col-sm-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php echo __('Customer Info'); ?></h3>
                </div>
                <div class="panel-body">
                    <?php echo __('First name'); ?>: <?php echo $shop['Order']['first_name']; ?><br />
                    <?php echo __('Last name'); ?>: <?php echo $shop['Order']['last_name']; ?><br />
                    <?php echo __('Email'); ?>: <?php echo $shop['Order']['email']; ?><br />
                    <?php echo __('Phone'); ?>: <?php echo $shop['Order']['phone']; ?>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php echo __('Billing Address'); ?></h3>
                </div>
                <div class="panel-body">
                    <?php echo __('Billing Address'); ?>: <?php echo $shop['Order']['billing_address']; ?><br />
                    <?php echo __('Billing Address 2'); ?>: <?php echo $shop['Order']['billing_address2']; ?><br />
                    <?php echo __('Billing City'); ?>: <?php echo $shop['Order']['billing_city']; ?><br />
                    <?php echo __('Billing State'); ?>: <?php echo $shop['Order']['billing_state']; ?><br />
                    <?php echo __('Billing Zip'); ?>: <?php echo $shop['Order']['billing_zip']; ?><br />
                    <?php echo __('Billing Country'); ?>: <?php echo $shop['Order']['billing_country']; ?>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php echo __('Shipping Address'); ?></h3>
                </div>
                <div class="panel-body">
                    <?php echo __('Shipping Address'); ?>: <?php echo $shop['Order']['shipping_address']; ?><br />
                    <?php echo __('Shipping Address 2'); ?>: <?php echo $shop['Order']['shipping_address2']; ?><br />
                    <?php echo __('Shipping City'); ?>: <?php echo $shop['Order']['shipping_city']; ?><br />
                    <?php echo __('Shipping State'); ?>: <?php echo $shop['Order']['shipping_state']; ?><br />
                    <?php echo __('Shipping Zip'); ?>: <?php echo $shop['Order']['shipping_zip']; ?><br />
                    <?php echo __('Shipping Country'); ?>: <?php echo $shop['Order']['shipping_country']; ?>
                </div>
            </div>
        </div>
    </div>

    <hr>

    <div class="row">
        <div class="col-sm-1"></div>
        <div class="col-sm-6"><?php echo __('Item'); ?></div>
        <div class="col-sm-1"><?php echo __('Weight'); ?></div>
        <div class="col-sm-1"><?php echo __('Weight'); ?></div>
        <div class="col-sm-1"><?php echo __('Price'); ?></div>
        <div class="col-sm-1" style="text-align: right;"><?php echo __('Quantity'); ?></div>
        <div class="col-sm-1" style="text-align: right;"><?php echo __('Subtotal'); ?></div>
    </div>

    <br />
    <br />

    <?php foreach ($shop['OrderItem'] as $item): ?>
        <div class="row">
            <div class="col-sm-1"><?php echo $this->Html->image('/images/' . $item['ProductsImage'][0]['image'], array('height' => 60, 'class' => 'px60')); ?></div>
            <div class="col-sm-6">
                <?php echo $item['Product']['name']; ?>
                <?php if (isset($item['Product']['productmod_name'])) : ?>
                    <br />
                    <small><?php echo $item['Product']['productmod_name']; ?></small>
                <?php endif; ?>
            </div>
            <div class="col-sm-1"><?php echo $item['Product']['weight']; ?></div>
            <div class="col-sm-1"><?php echo $item['totalweight']; ?></div>
            <div class="col-sm-1"><?php echo $this->Formatacao->moeda($item['Product']['price']); ?></div>
            <div class="col-sm-1" style="text-align: right;"><?php echo $item['quantity']; ?></div>
            <div class="col-sm-1" style="text-align: right;"><?php echo $this->Formatacao->moeda($item['subtotal']); ?></div>
        </div>
    <?php endforeach; ?>

    <hr>

    <div class="row">
        <div class="col-sm-10"><?php echo __('Products'); ?>: <?php echo $shop['Order']['order_item_count']; ?></div>
        <div class="col-sm-1" style="text-align: right;"><?php echo __('Items'); ?>: <?php echo $shop['Order']['quantity']; ?></div>
        <div class="col-sm-1" style="text-align: right;"><?php echo __('Total'); ?><br /><strong><?php echo $this->Formatacao->moeda($shop['Order']['total']); ?></strong></div>
    </div>

    <hr>


    <?php echo $this->Form->create('Order'); ?>

    <?php echo $this->Form->button(__('Submit Order'), array('icon' => 'fa fa-usd', 'class' => 'btn btn-primary', 'ecape' => false)); ?>

    <?php echo $this->Form->end(); ?>
</div>